export const useCounterStore = defineStore('counter', () => {
  const count = ref(0)
  const doubleCount = computed(() => count.value * 2)
  function increment() {
    count.value++
  }
  const $reset = () => {
    count.value = 0
  }
  return { count, doubleCount, increment, $reset }
}, {
  persist: {
    enabled: true,
    strategies: [
      {
        key: 'cats', //自定义 Key值
        storage: sessionStorage, // 选择存储方式
      },
    ],
  },
})
